<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;

class CreatePrintLogTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('print_log', function (Blueprint $table) {
            $table->bigIncrements('id');
            $table->integer('project_id')->default(0)->comment('项目id');
            $table->integer('grid_id')->default(0)->comment('网格id');
            $table->integer('print_type')->default(0)->comment('打印类型');
            $table->integer('supply_form')->default(0)->comment('补偿类型');
            $table->integer('build_form')->default(0)->comment('建筑形式');
            $table->text('content')->comment('内容');
            $table->integer('auto_num')->default(0)->comment('自增编号');
            $table->integer('admin_id')->default(0)->comment('管理员id');
            $table->integer('sign_set_type')->default(0)->comment('协议模板类型');
            $table->string('number_header')->default('')->comment('编号头');
            $table->timestamps();
            $table->softDeletes();
        });
        \Illuminate\Support\Facades\DB::statement("ALTER TABLE `print_log` comment '打印日志表'");
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('print_log');
    }
}
